from django.test import TestCase
from models import User
from keystone_util import Keystone

class UserTestCase(TestCase):
    
    def test_create_user(self):
        User.objects.create(username='lion',password='123456',is_active=0,email="1325887562@qq.com",phone="15754715473")
    
    def test_get_all_users(self):
        User.objects.all()
        
    def test_get_all_tenant(self):
        keystoneclient = Keystone()
        v_client = keystoneclient.admin_login()
        tenantlist = keystoneclient.get_tenant_list(v_client)
        print tenantlist
        
    def test_get_all_users(self):
        keystoneclient = Keystone()
        v_client = keystoneclient.admin_login()
        userlist = keystoneclient.get_user_list(v_client)
        print userlist
